package com.msh.platform.elm.entity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Objects;

@Entity
@Table(name = "buyer_ord_item", schema = "mscm_dev", catalog = "")
public class BuyerOrdItem {
    private String id;
    private String ordId;
    private Integer specId;
    private Integer pubNoId;
    private BigDecimal price;
    private Integer dqTime;
    private BigDecimal amount;
    private String deleteFlag;
    private Integer createTime;

    @Id
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "ord_id")
    public String getOrdId() {
        return ordId;
    }

    public void setOrdId(String ordId) {
        this.ordId = ordId;
    }

    @Basic
    @Column(name = "spec_id")
    public Integer getSpecId() {
        return specId;
    }

    public void setSpecId(Integer specId) {
        this.specId = specId;
    }

    @Basic
    @Column(name = "pub_no_id")
    public Integer getPubNoId() {
        return pubNoId;
    }

    public void setPubNoId(Integer pubNoId) {
        this.pubNoId = pubNoId;
    }

    @Basic
    @Column(name = "price")
    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Basic
    @Column(name = "dq_time")
    public Integer getDqTime() {
        return dqTime;
    }

    public void setDqTime(Integer dqTime) {
        this.dqTime = dqTime;
    }

    @Basic
    @Column(name = "AMOUNT")
    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    @Basic
    @Column(name = "DELETE_FLAG")
    public String getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    @Basic
    @Column(name = "CREATE_TIME")
    public Integer getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Integer createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BuyerOrdItem that = (BuyerOrdItem) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(ordId, that.ordId) &&
                Objects.equals(specId, that.specId) &&
                Objects.equals(pubNoId, that.pubNoId) &&
                Objects.equals(price, that.price) &&
                Objects.equals(dqTime, that.dqTime) &&
                Objects.equals(amount, that.amount) &&
                Objects.equals(deleteFlag, that.deleteFlag) &&
                Objects.equals(createTime, that.createTime);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, ordId, specId, pubNoId, price, dqTime, amount, deleteFlag, createTime);
    }
}
